/***
 * @常量路由
 */
export const Layout = () => import("@/views/Layout/index.vue")
export const constRouter = [
    {
        path: "/",
        redirect: "/home",
        meta: {
            isShow: false,
            isHome: true,
            auth: false,
        },
    },
    {
        path: "/login",
        name: "login",
        meta: {
            title: 'router.login',
            icon: "",
            isShow: false
        },
        component: () => import("@/views/Login/index.vue"),
    },
    {
        path: "/home",
        name: "home",
        meta: {
            title: 'router.home',
            icon: "/assets/icons/img_home.png",
            isShow: true,
            isHome: true,
            auth: false,
        },
        component: () => import("@/views/Home/index.vue"),
    },
    {
        path: "/introduction",
        name: "introduction",
        meta: {
            title: 'router.introduction',
            isShow: false,
            isHome: true,
            auth: false,
        },
        component: () => import("@/views/Home/introduction.vue"),
    },
    {
        path: "/about",
        name: "about",
        meta: {
            title: 'router.about',
            isShow: false,
            isHome: true,
            auth: false,
        },
        component: () => import("@/views/Home/about.vue"),
    },
    {
        path: "/account",
        name: "account",
        redirect: "/account/index",
        meta: {title: "", icon: "", isShow: false},
        component: Layout,
        children: [
            {
                path: "/account/index",
                name: "account_index",
                meta: {
                    title: 'router.account',
                    icon: "icon-qunzhongluxian",
                    isShow: true,
                },
                component: () => import("@/views/Account/index.vue"),
            },
            {
                path: "/account/buy",
                name: "account_buy",
                meta: {
                    title: 'router.accountBuy',
                    isShow: false,
                    active: "/account/index"
                },
                component: () => import("@/views/Account/buy.vue"),
            },
            {
                path: "/account/confirmorder",
                name: "account_confirmorder",
                meta: {
                    title: 'router.confirmorder',
                    isShow: false,
                    active: "/account/index"
                },
                component: () => import("@/views/Account/confirmorder.vue"),
            },
            {
                path: "/account/detail",
                name: "account_detail",
                meta: {
                    title: 'router.accountDetail',
                    isShow: false,
                    active: "/account/index"
                },
                component: () => import("@/views/Account/detail.vue"),
            },
        ]
    },
    {
        path: "/order",
        name: "order",
        redirect: "/order/index",
        meta: {title: "", icon: "", isShow: false},
        component: Layout,
        children: [
            {
                path: "/order/index",
                name: "order_index",
                meta: {
                    title: 'router.order',
                    icon: "Tickets",
                    isShow: true,
                },
                component: () => import("@/views/Order/index.vue"),
            },
        ]
    },
    {
        path: "/withdraw",
        name: "withdraw",
        redirect: "/withdraw/index",
        meta: {title: "", icon: "", isShow: false},
        component: Layout,
        children: [
            {
                path: "/withdraw/index",
                name: "withdraw_index",
                meta: {
                    title: 'router.withdraw',
                    icon: "Money",
                    isShow: true,
                },
                component: () => import("@/views/Withdraw/index.vue"),
            },
        ]
    },
    // {
    //     path: "/works",
    //     name: "works",
    //     redirect: "/works/index",
    //     meta: {
    //         title: "作品中心",
    //         icon: "notebook",
    //         isShow: true,
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/works/index",
    //             name: "works_rank",
    //             meta: {title: "内容榜单", icon: "", isShow: true},
    //             component: () => import((`@/views/works/index.vue`)),
    //         },
    //     ]
    // },
    // {
    //     path: "/content",
    //     name: "content",
    //     redirect: "/content/video",
    //     meta: {
    //         title: "内容中心",
    //         icon: "/assets/icons/img_content.png",
    //         isShow: true,
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/content/video",
    //             name: "content_video",
    //             meta: {title: "视频管理", icon: "", isShow: true},
    //             component: () => import("@/views/Video/video.vue"),
    //         },
    //         {
    //             path: "/content/collection",
    //             name: "content_collection",
    //             meta: {title: "合集管理", icon: "", isShow: true},
    //             component: () => import("@/views/Video/collection.vue"),
    //         },
    //     ],
    // },
    // {
    //     path: "/advert",
    //     name: "advert",
    //     redirect: "/advert/recommend",
    //     meta: {
    //         title: "投放中心",
    //         icon: "/assets/icons/img_dsp.png",
    //         isShow: true,
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/advert/recommend",
    //             name: "advert_recommend",
    //             meta: {title: "投放推荐", icon: "", isShow: true},
    //             component: () => import("@/views/Advert/recommend.vue"),
    //         },
    //         {
    //             path: "/advert/order",
    //             name: "advert_order",
    //             meta: {title: "我的订单", icon: "", isShow: true},
    //             component: () => import("@/views/Advert/order.vue"),
    //         },
    //         {
    //             path: "/advert/wallet",
    //             name: "advert_wallet",
    //             meta: {title: "我的钱包", icon: "", isShow: true},
    //             component: () => import("@/views/Advert/wallet.vue"),
    //         },
    //         {
    //             path: "/advert/moneyLog",
    //             name: "advert_moneyLog",
    //             meta: {
    //                 title: "流水明细",
    //                 icon: "",
    //                 isShow: false,
    //                 active: "/advert/wallet",
    //             },
    //             component: () => import("@/views/Advert/moneyLog.vue"),
    //         },
    //         {
    //             path: "/advert/data",
    //             name: "advert_data",
    //             meta: {title: "数据分析", icon: "", isShow: true},
    //             component: () => import("@/views/Advert/data.vue"),
    //         },
    //     ],
    // },
    // {
    //     path: "/data",
    //     name: "data",
    //     redirect: "/data/index",
    //     meta: {
    //         title: "数据中心",
    //         icon: "/assets/icons/img_data.png",
    //         isShow: true,
    //     },
    //     component: Layout,
    //     children: [
    //         // {
    //         //     path: "/data/index",
    //         //     name: "data_index",
    //         //     meta: {title: "数据总览", icon: "", isShow: true},
    //         //     component: () => import("@/views/DataCenter/index.vue"),
    //         // },
    //         {
    //             path: "/data/fans",
    //             name: "data_fans",
    //             meta: {title: "粉丝分析", icon: "", isShow: true},
    //             component: () => import("@/views/DataCenter/fans.vue"),
    //         },
    //     ],
    // },
    // {
    //     path: "/user",
    //     name: "user",
    //     redirect: "/user/index",
    //     meta: {
    //         title: "账号中心",
    //         icon: "user",
    //         isShow: true,
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/user/index",
    //             name: "user_index",
    //             meta: {title: "资质认证", icon: "", isShow: true},
    //             component: () => import((`@/views/user/index.vue`)),
    //         },
    //         {
    //             path: "/user/auth",
    //             name: "user_auth",
    //             meta: {title: "提交资质", icon: "", isShow: false, active: "/user/index"},
    //             component: () => import((`@/views/user/auth.vue`)),
    //         },
    //     ]
    // },
    // {
    //     path: "/copyright",
    //     name: "copyright",
    //     redirect: "/copyright/index",
    //     meta: {
    //         title: "版权中心",
    //         icon: "/assets/icons/img_copyright.png",
    //         isShow: true,
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/copyright/index",
    //             name: "copyright_index",
    //             meta: {title: "版权认证", icon: "", isShow: true},
    //             component: () => import("@/views/Copyright/index.vue"),
    //         },
    //         {
    //             path: "/copyright/trade",
    //             name: "copyright_trade",
    //             meta: {title: "版权交易", icon: "", isShow: true},
    //             component: () => import("@/views/Copyright/trade.vue"),
    //         },
    //         {
    //             path: "/copyright/submit",
    //             name: "copyright_submit",
    //             meta: {title: "上传作品", icon: "", isShow: false, hidden: true},
    //             component: () => import("@/views/Copyright/submit.vue"),
    //         },
    //     ],
    // },
    // // {
    // //     path: "/",
    // //     name: "document",
    // //     redirect: "/document",
    // //     meta: {title: "", icon: "", isShow: false},
    // //     component: Layout,
    // //     children: [
    // //         {
    // //             path: "/document",
    // //             name: "document",
    // //             meta: {title: "文档", icon: "Document", isShow: true},
    // //             component: () => import("@/views/Document/index.vue"),
    // //         },
    // //     ],
    // // },
    {
        path: "/404",
        meta: {title: "404", isShow: false},
        component: () => import("@/views/404/index.vue"),
    },
]
/****
 * @异步路由也叫权限路由
 */
export const asyncRouter = [
    // {
    //     path: "/",
    //     name: "canvas",
    //     redirect: "/canvas",
    //     meta: {title: "", icon: "", isShow: false},
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/canvas",
    //             name: "canvas",
    //             meta: {title: "canvas案例", icon: "EditPen", isShow: true},
    //             component: () => import("@/views/Canvas/index.vue"),
    //         },
    //     ],
    // },
    // {
    //     path: "/components",
    //     name: "components",
    //     redirect: "/components/pagination",
    //     meta: {title: "封装组件", icon: "Menu", isShow: true},
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/components/pagination",
    //             name: "pagination",
    //             meta: {title: "分页器 ", icon: "MoreFilled", isShow: true},
    //             component: () => import("@/views/Components/pagination/index.vue"),
    //         },
    //         {
    //             path: "/components/edit",
    //             name: "edit",
    //             meta: {title: "富文本编辑器 ", icon: "Monitor", isShow: true},
    //             component: () => import("@/views/Components/edit/index.vue"),
    //         },
    //     ],
    // },
    // {
    //     path: "/moremenu",
    //     name: "moremenu",
    //     meta: {title: "多级菜单", icon: "Operation", isShow: true},
    //     component: Layout,
    //     children: [
    //         {
    //             path: "/moremenu/menu-one",
    //             name: "menu-one",
    //             meta: {title: "一级菜单 ", icon: "DArrowRight", isShow: true},
    //             component: () => import("@/views/MoreMenu/MenuOne/index.vue"),
    //             children: [
    //                 {
    //                     path: "/moremenu/menu-one/menu-two",
    //                     name: "menu-two",
    //                     meta: {title: "二级菜单 ", icon: "DArrowRight", isShow: true},
    //                     component: () =>
    //                         import("@/views/MoreMenu/MenuOne/MenuTwo/index.vue"),
    //                     children: [
    //                         {
    //                             path: "/moremenu/menu-one/menu-two/menu-three-1",
    //                             name: "menu-three-1",
    //                             meta: {
    //                                 title: "三级菜单-1",
    //                                 icon: "DArrowRight",
    //                                 isShow: true,
    //                             },
    //                             component: () =>
    //                                 import(
    //                                     "@/views/MoreMenu/MenuOne/MenuTwo/MenuThree/index-1.vue"
    //                                     ),
    //                         },
    //                         {
    //                             path: "/moremenu/menu-one/menu-two/menu-three-2",
    //                             name: "menu-three-2",
    //                             meta: {
    //                                 title: "三级菜单-2",
    //                                 icon: "DArrowRight",
    //                                 isShow: true,
    //                             },
    //                             component: () =>
    //                                 import(
    //                                     "@/views/MoreMenu/MenuOne/MenuTwo/MenuThree/index-2.vue"
    //                                     ),
    //                         },
    //                     ],
    //                 },
    //             ],
    //         },
    //     ],
    // },
]
/***
 * @任意路由
 */
export const anyRouter = [
    //任意路由
    {
        path: "/:pathMatch(.*)*",
        // name: 'Any',
        meta: {title: "任意路由", isShow: false},
        redirect: "/404",
    },
]
